package iface

import "reflect"

type BeanPostProcessor interface {
	PostProcessBeforeInitialization(beanName string, bean any) any
	PostProcessAfterInitialization(beanName string, bean any) any
}

var RefTypeOfBeanPostProcessor = reflect.TypeOf((*BeanPostProcessor)(nil)).Elem()

// ========================================================================
// ======================= AbstractBeanPostProcessor ======================
// ========================================================================
var _ BeanPostProcessor = (*AbstractBeanPostProcessor)(nil)

type AbstractBeanPostProcessor struct{}

func (AbstractBeanPostProcessor) PostProcessBeforeInitialization(beanName string, bean any) any {
	return bean
}

func (AbstractBeanPostProcessor) PostProcessAfterInitialization(beanName string, bean any) any {
	return bean
}
